class student:
    def __init__(self, id, name, age, sex, height, weight, score, address, phone):
        self.id = id
        self.name = name
        self.age = age
        self.sex = sex
        self.height = height
        self.weight = weight
        self.score = score
        self.address = address
        self.phone = phone

    def study(self,time):
        print(f"{self.name}正在学习{time}")

    def play_game(self,game):
        print(f"{self.name}正在玩{game}")

    def programming(self,l_count):
        print(f"{self.name}已经写了{l_count}行代码")

    def sum_num(self,*num):
        return sum(num)

xiaoming = student('23','小明',21,'male',177,120,500,'郑州','1458894758')
xiaoming.study('数学')
xiaoming.play_game("荒野")
xiaoming.programming(500)
xiaoming.sum_num(1,2,3,4,5,6,7,8,9,10)


class car:
    def __init__(self,model,tire_count,color,weight,tank):
        self.model = model
        self.tire_count = tire_count
        self.color = color
        self.weight = weight
        self.tank = tank

    def run(self,type):
        print(f"这{self.model}用于{type}")

FalaL = car("法拉利",4,"red","10kg","20L")
BMW = car("宝马",4,"white","10kg","20L")
LingM = car("铃木",4,"black","10kg","20L")
WuL = car("五菱",4,"brown","10kg","20L")
Tractor = car("拖拉机",4,"red","10kg","20L")
Tractor.run("犁地")

class laptop:
    def __init__(self,model,run_time,color,weight,cpu,memory,hard_drive):
        self.model = model
        self.run_time = run_time
        self.color =color
        self.weight = weight
        self.cpu = cpu
        self.memory = memory
        self.hard_drive = hard_drive

    def play_game(self,game):
        print(f"玩{game}")
    def work(self):
        print("我不想上班o(╥﹏╥)o")

class monkey:
    def __init__(self,kind,sex,color,weight):
        self.kind = kind
        self.sex = sex
        self.color = color
        self.weight = weight
    def make_fire(self,material):
        print(f"正在使用{material}生火")
    def study(self,*things):
        print(f"正在学习{things}")
monkey = monkey("金丝猴",'公',"金色",'10kg')
monkey.make_fire("木头")
monkey.study("算术")


class human:
    def __init__(self,name,sex,age,phone_count,brand,battery,size,run_time,points):
        self.name = name
        self.sex = sex
        self.age = age
        self.phone_count = phone_count
        self.brand = brand
        self.battery = battery
        self.size = size
        self.run_time = run_time
        self.points = points

    def e_mail(self,mail):
        print(f"发送短信内容为{mail}")

    def call(self,o_phone,time):
        if o_phone is None :
            print("该号码为空号")
        elif self.phone_count<1:
            print("话费不足")
        else:
            print("拨通")
            if time>0 and time <=10:
                self.phone_count -= 1*time
                self.points += 15*time
                print(f"本次通话{time}分钟,花费{1 * time},余额{self.phone_count},获得积分{15 * time},总积分{self.points}")
            elif time>10 and time <=20:
                self.phone_count -= 0.8*time
                self.points += 39*time
                print(f"本次通话{time}分钟,花费{0.8 * time},余额{self.phone_count},获得积分{39 * time},总积分{self.points}")
            elif time>20:
                self.phone_count -= 0.65 * time
                self.points += 48 * time
                print(f"本次通话{time}分钟,花费{0.65*time},余额{self.phone_count},获得积分{48*time},总积分{self.points}")

person = human("张三","男",25,150,"oppo","7000mAh","16.5",200,400)

person.call(15366664444,15)
